<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:r="http://richfaces.org/rich" xmlns:a="http://richfaces.org/a4j">
	
	<r:dataTable id="dtReleases" value="#{product.releases}" var="release" width="100%">

		<r:column>
			<f:facet name="header">
				<h:outputText value="#{messages.codigo}"/>
			</f:facet>
			
			<h:outputText value="#{release.oid}" />
		</r:column>
		
		<r:column>
			<f:facet name="header">
				<h:outputText value="#{messages.nome}"/>
			</f:facet>
			
			<s:link view="/pages/release/release.xhtml" value="#{release.nome}">
				<f:param name="oid" value="#{release.oid}"/>
				<s:conversationPropagation type="end"/>
			</s:link>
		</r:column>

		<r:column styleClass="centro">
			<f:facet name="header">
				<h:outputText value="#{messages.periodo}" />
			</f:facet>
			<h:outputText value="#{release.dataInicio}">
				<f:convertDateTime pattern="dd/MM/yyyy"/>
			</h:outputText>
			<h:outputText value=" #{messages.ate} " styleClass="destaque"/>
			<h:outputText value="#{release.dataFim}">
				<f:convertDateTime pattern="dd/MM/yyyy"/>
			</h:outputText>
		</r:column>

		<r:column styleClass="centro">
			<f:facet name="header">
				<h:outputText value="#{messages.semanas}" />
			</f:facet>
			<h:outputText value="#{release.duracao}"/>
		</r:column>

		<r:column>
			<f:facet name="header">
				<h:outputText value="#{messages.descricao}"/>
			</f:facet>
			
			<h:outputText value="#{release.descricao}" />
		</r:column>	
		
		<r:column styleClass="centro">
			<f:facet name="header">
				<h:outputText value="#{messages.acoes}" />
			</f:facet>
			
			<s:link view="/pages/releasePlan/releasePlan.xhtml" title="#{messages.releasePlan}" propagation="end">
				<f:param name="idp" value="#{release.product.oid}"/>
				<f:param name="idr" value="#{release.oid}"/>
				<h:graphicImage value="/img/package.png" alt="#{messages.releasePlan}" styleClass="imgAcao"/>
			</s:link>
			<h:outputText value=" " />
			<a:commandButton image="/img/chart_organisation.png" title="#{messages.releaseGanttChart}" action="#{chartMB.gerarGraficoGantt(release)}" oncomplete="Richfaces.showModalPanel('mpChart');" ajaxSingle="true" styleClass="imgAcao" reRender="opChart"/>
			<h:outputText value=" " />
			<a:commandButton image="/img/chart_pie.png" title="#{messages.backlogPieChart}" action="#{chartMB.gerarGraficoBacklogPie(release)}" oncomplete="Richfaces.showModalPanel('mpChart');" ajaxSingle="true" styleClass="imgAcao" reRender="opChart"/>
			<h:outputText value=" " />			
			<a:commandButton image="/img/chart_line.png" title="#{messages.dailyScrumChart}" action="#{chartMB.gerarGraficoBurnDown(release)}" oncomplete="Richfaces.showModalPanel('mpChart');" styleClass="imgAcao" reRender="opChart"/>			
			<h:outputText value=" " />
			
		</r:column>
	</r:dataTable>

</ui:composition>